/**
 * 
 */
package com.testing.json;

import java.util.ArrayList;
import java.util.List;

/**
 *
 * @author Jason
 * created at: Nov 2, 2011
 */
public class SimplePOJO {
	private String name;
	private Integer age;
	private List<String> pets;
	
	/**
	 * ctor
	 * @param pName
	 * @param pAge
	 * @param pPets
	 */
	public SimplePOJO(String pName, Integer pAge, String[] pPets) {
		this.name=pName;
		this.age=pAge;
		if (pPets!=null) {
			this.pets=new ArrayList<String>();
			
			for (String aPet:pPets) {
				this.pets.add(aPet);
			}
		}
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public Integer getAge() {
		return age;
	}

	public void setAge(Integer age) {
		this.age = age;
	}

	public List<String> getPets() {
		return pets;
	}

	public void setPets(List<String> pets) {
		this.pets = pets;
	}

	@Override
	public String toString() {
		return "SimplePOJO [name=" + name + ", age=" + age + ", pets=" + pets
				+ "]";
	}
}
